package cn.com.dcsgo.domain.dto;

import cn.com.dcsgo.common.validation.InIfNotNull;
import cn.com.dcsgo.common.validation.NotBlankIfNotNull;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 修改部门 请求参数
 *
 * @author Dcsgo
 * @since 2025-05-20 17:30:53
 */
@Schema(description = "修改部门 请求参数")
@Data
public class SysDeptUpdateDTO implements Serializable {
    /**
     * 部门id
     */
    @NotNull(message = "部门编号不能为空")
    @Min(value = 0, message = "部门编号不能小于0")
    @Schema(description = "部门编号")
    private Long deptId;

    /**
     * 父部门id
     */
    @Min(value = 0, message = "上级部门编号不能小于0")
    @Schema(description = "上级部门编号")
    private Long parentId;

    /**
     * 部门名称
     */
    @NotBlankIfNotNull(message = "部门名称不能为空白字符串")
    @Schema(description = "部门名称")
    private String deptName;

    /**
     * 显示顺序
     */
    @Schema(description = "显示顺序")
    private Integer orderNum;

    /**
     * 负责人编号
     */
    @Min(value = 0, message = "负责人编号不能小于0")
    @Schema(description = "负责人编号")
    private Long leaderId;

    /**
     * 状态（0正常 1停用）
     */
    @Schema(description = "状态（0正常 1停用）")
    @InIfNotNull(message = "状态只能为：0正常 1停用", value = {"0", "1"})
    private Integer status;

    @Serial
    private static final long serialVersionUID = 1L;
}